package com.kefu.chat.vo;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Size;

import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.date.DateUtil;
import com.baomidou.mybatisplus.annotation.TableField;
import com.kefu.chat.model.ChatChannel;
import com.kefu.chat.model.ChatChannelExtModel;
import com.kefu.chat.model.ChatChannelSideBar;
import com.kefu.common.vo.AbstractUpdateVo;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;

import java.util.List;

@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
@ApiModel(description = "渠道配置")
public class ChatChannelUpdateVo extends AbstractUpdateVo<ChatChannel, String> {
    @NotEmpty
    @ApiModelProperty(name = "channelId", value = "主键")
    private String channelId;

    @NotEmpty
    @ApiModelProperty(name = "channelName", value = "渠道名称")
    private String channelName;

    @ApiModelProperty(name = "channelStatus", value = "状态：0禁用，1正常")
    private Integer channelStatus;

    @ApiModelProperty(name = "inviteMode", value = "主动邀请：0关闭，1开启")
    private Integer inviteMode;

    @ApiModelProperty(name = "travelMode", value = "浏览轨迹：0关闭，1开启")
    private Integer travelMode;

    @ApiModelProperty(name = "receiveMode", value = "接待模式：0机器人优先，1人工优先，2仅机器人，3仅人工")
    private Integer receiveMode;

    @ApiModelProperty(name = "robotNo", value = "机器人")
    private Integer robotNo;

    @ApiModelProperty(name = "groupMode", value = "分组接待：0关闭，1开启")
    private Integer groupMode;

    @ApiModelProperty(value = "分组接待样式：1=文本样式，2=图文样式，3=图文+描述样式")
    private Integer groupStyle;

    @ApiModelProperty(value = "分组接待引导文案")
    private String groupGuideMsg;

    @ApiModelProperty(value = "技能组设置，json格式")
    private String groupConfig;

    @ApiModelProperty(name = "keywordMode", value = "关键词转人工：0关闭，1开启")
    private Integer keywordMode;

    @ApiModelProperty(value = "排队策略： default,vip")
    private String queueMode;

    @ApiModelProperty(value = "vip 优先时间,分钟")
    private Integer vipTime;

    @ApiModelProperty(name = "robotEvaluate", value = "机器人回答顶踩：0关闭，1开启")
    private Integer robotEvaluate;

    @ApiModelProperty(value = "机器人回答点'踩'是否转人工：0关闭，1开启")
    private Integer robotEvaluateTransferUserMode;

    @ApiModelProperty(name = "noticeMode", value = "通告消息：0关闭，1开启")
    private Integer noticeMode;

    @ApiModelProperty(value = "通告背景颜色")
    private String noticeBgColor;

    @ApiModelProperty(value = "通告文字颜色")
    private String noticeTextColor;

    @ApiModelProperty(name = "noticeMsg", value = "通告消息")
    private String noticeMsg;

    @ApiModelProperty(name = "robotWelcomeMode", value = "机器人欢迎语：0关闭，1开启")
    private Integer robotWelcomeMode;

    @ApiModelProperty(name = "robotWelcomeMsg", value = "机器人欢迎语")
    private String robotWelcomeMsg;

    @ApiModelProperty(name = "adminWelcomeMode", value = "客服欢迎语：0关闭，1开启")
    private Integer adminWelcomeMode;

    @ApiModelProperty(name = "adminWelcomeMsg", value = "客服欢迎语")
    private String adminWelcomeMsg;

    @ApiModelProperty(name = "robotUnknownMsg", value = "机器人未知回答")
    private String robotUnknownMsg;

    @ApiModelProperty(name = "adminOfflineMode", value = "客服不在线说辞：0关闭，1开启")
    private Integer adminOfflineMode;

    @ApiModelProperty(name = "adminOfflineMsg", value = "客服不在线说辞")
    private String adminOfflineMsg;

    @ApiModelProperty(name = "userQueueMode", value = "用户排队说辞：0关闭，1开启")
    private Integer userQueueMode;

    @ApiModelProperty(name = "userQueueMsg", value = "用户排队说辞")
    private String userQueueMsg;

    @ApiModelProperty(name = "adminCloseMode", value = "客服结束会话说辞：0关闭，1开启")
    private Integer adminCloseMode;

    @ApiModelProperty(name = "adminCloseMsg", value = "客服结束会话说辞")
    private String adminCloseMsg;

    @ApiModelProperty(name="unWorkingMsg",value = "非工作时间")
    private String unWorkingMsg;

    @ApiModelProperty(name = "adminTimeoutMode", value = "客服超时提示：0关闭，1开启")
    private Integer adminTimeoutMode;

    @ApiModelProperty(name = "adminTimeoutMsg", value = "客服超时提示")
    private String adminTimeoutMsg;

    @ApiModelProperty(name = "adminTimeoutTime", value = "客服超时提示分钟数")
    private Integer adminTimeoutTime;

    @ApiModelProperty(name = "userTimeoutMode", value = "用户超时提示：0关闭，1开启")
    private Integer userTimeoutMode;

    @ApiModelProperty(name = "userTimeoutMsg", value = "用户超时提示")
    private String userTimeoutMsg;

    @ApiModelProperty(name = "userTimeoutTime", value = "用户超时提示分钟数")
    private Integer userTimeoutTime;

    @ApiModelProperty(name = "userOverTime", value = "用户超时下线分钟数")
    private Integer userOverTime;

    @ApiModelProperty(name = "userOverMsg", value = "用户超时下线")
    private String userOverMsg;

    @ApiModelProperty(name = "kitIcon", value = "套件图标，0-5")
    private Integer kitIcon;

    @ApiModelProperty(name = "kitPosition", value = "套件位置，0右下，1左下")
    private Integer kitPosition;

    @ApiModelProperty(name = "kitMarginx", value = "套件侧边距")
    private Integer kitMarginx;

    @ApiModelProperty(name = "kitMarginy", value = "套件下边距")
    private Integer kitMarginy;

    @ApiModelProperty(name = "kitBgcolor", value = "背景颜色")
    private String kitBgcolor;

    @ApiModelProperty(name = "kitTxcolor", value = "文字颜色")
    private String kitTxcolor;

    @ApiModelProperty(value = "满意度评价开关：0关闭，1开启")
    private Integer evaluateMode;

    @ApiModelProperty(value = "工单留言开关：0关闭，1开启")
    private Integer workorderMode;

    @ApiModelProperty(value = "窗口标题文案")
    private String titleDesc;
    @ApiModelProperty(value = "询前表单开关：0关闭，1开启")
    private Integer userFormMode;
    @ApiModelProperty(value = "询前表单设置，json格式")
    private String userFormConfig;
    @ApiModelProperty(value = "熟客指定分配，0关闭，1开启")
    private Integer chooseLastAdminMode;
    @ApiModelProperty(value = "机器人提示：0关闭，1开启")
    private Integer robotTipMode;

    @ApiModelProperty(value = "appId")
    private String appId;
    @ApiModelProperty(value = "secret")
    private String appSecret;
    @ApiModelProperty(value = "token")
    private String appToken;
    @ApiModelProperty(value = "aesKey")
    private String aesKey;
    @ApiModelProperty(value = "微信消息体格式，XML，JSON")
    private String msgDataFormat;
    @ApiModelProperty(value = "corpId")
    private String corpId;
    @ApiModelProperty(value = "agentId")
    private Integer agentId;

    @ApiModelProperty(value = "语音视频聊天开关 0=关闭，1=开启")
    private Integer videoFlag;
    @ApiModelProperty(value = "套件宽度")
    private Integer kitWidth;
    @ApiModelProperty(value = "窗口宽度")
    private Integer winWidth;

    @ApiModelProperty(value = "语言：zh=中文")
    private String language;

    @ApiModelProperty(value = "显示侧边栏：0=否，1=是")
    private Integer sideBarStatus;
    @ApiModelProperty(value = "侧边栏在聊天框右边占位")
    private Integer sideBarWidth;

    @ApiModelProperty(value = "主题颜色")
    private String mainColor;
    @ApiModelProperty(value = "桌面网站页面宽")
    private Integer mainWidth;
    @ApiModelProperty(value = "桌面网站页面高")
    private Integer mainHeight;

    @ApiModelProperty(value = "是否显示导航条 0 = 否，1 = 是")
    private Integer navigationBarShowFlag;
    @ApiModelProperty(value = "导航条颜色")
    private String navigationBarColor;
    @ApiModelProperty(value = "导航条颜色  1= 展示接待客服＋企业名称,2=展示企业信息＋接待状态")
    private Integer navigationBarType;
    @ApiModelProperty(value = "导航条是否显示客服昵称0=否，1=是")
    private Integer navigationBarAgentFlag;
    @ApiModelProperty(value = "导航条是否显示客服昵称0=否，1=是")
    private Integer navigationBarAgentNickFlag;
    @ApiModelProperty(value = "导航条是否显示客服头像0=否，1=是")
    private Integer navigationBarAgentFaceFlag;
    @ApiModelProperty(value = "导航条是否显示企业名称0=否，1=是")
    private Integer navigationBarTenantNameFlag;
    @ApiModelProperty(value = "导航条显示企业名称")
    private Integer navigationBarTenantName;
    @ApiModelProperty(value = "导航条是否显示企业logo0=否，1=是")
    private Integer navigationBarTenantLogoFlag;
    @ApiModelProperty(value = "导航条显示企业logo地址")
    private String navigationBarTenantLogoUrl;

    @ApiModelProperty(name = "cusShowAgentFace", value = "客户发送消息时展示客服头像 0=否，1=是")
    private Integer cusShowAgentFace;
    @ApiModelProperty(name = "cusShowAgentNick", value = "客户发送消息时是否展示客服昵称 0=否，1=是")
    private Integer cusShowAgentNick;
    @ApiModelProperty(value = "对话消息可点击颜色")
    private String cusColor;

    @ApiModelProperty(value = "留言开关：0关闭，1开启")
    private Integer leaveMsgMode;
    @ApiModelProperty(value = "留言方式：1留言纪录，2转工单")
    private Integer leaveMsgType;
    @ApiModelProperty(value = "留言转工单工单类型")
    private String leaveMsgWoType;

    @ApiModelProperty(value = "是否开启常见问题 0=否，1=是")
    private Integer faqMode;
    @ApiModelProperty(name = "faqId", value = "常见问题方案id")
    private String faqId;

    @ApiModelProperty(value = "是否开启会话快捷菜单0=否，1=是")
    private Integer menuMode;
    @ApiModelProperty(value = "快捷菜单方案id", name = "menuConfigPlanId")
    private String menuConfigPlanId;

    @ApiModelProperty(value = "转人工按钮显示：0关闭，1开启")
    private Integer transferUserMode;
    @ApiModelProperty(value = "机器人直接回答转人工：0不转人工，1显示转人工按钮")
    private Integer robotAnswerTransferUserMode;
    @ApiModelProperty(value = "机器人理解回答转人工：0不转人工，1显示转人工按钮,2直接转人工")
    private Integer robotUnderstandTransferUserMode;
    @ApiModelProperty(value = "机器人引导回答转人工：0不转人工，1显示转人工按钮,2直接转人工")
    private Integer robotGuideTransferUserMode;
    @ApiModelProperty(value = "机器人未知回答转人工：0不转人工，1显示转人工按钮,2直接转人工")
    private Integer robotUnknownTransferUserMode;

    @ApiModelProperty(value = "是否开启广告位0=否，1=是")
    private Integer infomercialMode;

    @ApiModelProperty(value = "词条评价开关 0=否，1=是")
    private Integer commentDocMode;

    @Override
    public ChatChannel convert() {
        ChatChannel info = BeanUtil.toBean(this, ChatChannel.class);
        info.setUpdateTime(DateUtil.current());
        return info;
    }
}